<?
/**
 * Пролог
 */
define("PROLOG_INCLUDED", true);
define("FINISH_STREAM", true);
require_once $_SERVER["DOCUMENT_ROOT"]."/system/core/kernel.php";
require_once (USR_PATH . "events.php");

if (ACCESS_PATH === false) {
	ob_start("Templater");
	require_once (TPL_PATH . "header.php");
	echo LANG("SYSTEM_NO_ACCESS");
	if (!$USER->IsAdmin()) {
		Component::getComponent("system:user.login.form",
			"",
			Array()
		);
	}
	require_once (TPL_PATH . "footer.php");
	ob_end_flush();
	exit;
}

ob_start("Templater");

if (!defined('AJAX_MODE')) {
	require_once (TPL_PATH . "header.php");
} else {
	header ('Content-type: text/html; charset=utf-8');
}
?>